<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="box" data-id="wc 盒">wc 盒</div>
    <input type="text" value="张老三" placeholder="提示文本，请输入姓名">
    <input type="password">
    <input type="button" checked class="che">
    <select name="张老三" id="">
        <option value="name1">张老四</option>
        <option value="name1">王老五</option>
        <option value="name1">陈老六</option>
        <option value="name1">周老大</option>
        <button disabled> 我不是按钮</button>
    </select>
    <script>
        const inp = document.querySelector('input')
        inp.value = '黎明'
        inp.placeholder = '请输入神秘代码'
        const inp2 = document.querySelector('.che')
        inp2.checked = true
        const sel = document.querySelector('select option')
        sel.select = true

        //自定义属性
        const box = document.querySelector(".box")
        console.log(box.dataset.id);

    </script>
</body>

</html>